package com.rock.code.bigdata.bigdatainterface.service.impl;

import com.rock.code.bigdata.bigdatainterface.dao.HostResourceDao;
import com.rock.code.bigdata.bigdatainterface.domain.*;
import com.rock.code.bigdata.bigdatainterface.service.HostResourceService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;


@Service
@Transactional
public class HostResourceServiceImpl implements HostResourceService {
    @Resource
    private HostResourceDao hostResourceDao;

    @Override
    public void saveDatabase(TbCollectDatabase collectObject) {
        hostResourceDao.insertDatabase(collectObject);
    }

    @Override
    public void saveMiddleware(TbCollectMiddleware collectObject) {
        hostResourceDao.insertMiddleware(collectObject);
    }

    @Override
    public void saveHost(TbCollectHost collectObject) {
        hostResourceDao.insertHost(collectObject);
    }

    @Override
    public void saveNetwork(TbCollectNetwork collectObject) {
        hostResourceDao.insertNetwork(collectObject);
    }

    @Override
    public void saveService(TbCollectService collectObject) {
        hostResourceDao.insertService(collectObject);
    }

    @Override
    public void saveMachineroom(TbCollectMachineroom collectObject) {
        hostResourceDao.insertMachineroom(collectObject);
    }

    @Override
    public void saveVm(TbCollectVm collectObject) {
        hostResourceDao.insertVm(collectObject);
    }

    @Override
    public void saveLine(TbCollectLine collectObject) {
        hostResourceDao.insertLine(collectObject);
    }
}
